<!--  -->
<script setup>
import { ref } from "vue";

defineProps({
  goods: {
    type: Object,
    default: {},
  },
});
</script>

<template>
  <RouterLink :to="`/product/${goods.id}`" class="goods-item">
    <img v-lazy="goods.picture" alt />
    <p class="name ellipse">{{ goods.name }}</p>
    <p class="desc ellipse">{{ goods.desc }}</p>
    <p class="price">&yen;{{ goods.price }}</p>
  </RouterLink>
</template>

<style lang='less' scoped>
.goods-item {
  display: block;
  width: 230px;
  padding: 10px;
  margin-right: 18px;
  text-align: center;
  .hoverShadow();
  img {
    width: 160px;
    height: 160px;
  }
  p {
    padding-top: 10px;
  }
  .name {
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    padding: 0px 20px;
  }
  .desc {
    color: #999;
    height: 25px;
    line-height: 25px;
    padding: 0px 10px;
  }
  .price {
    padding-top: 0px;
    color: @priceColor;
    font-size: 17px;
  }
}
</style>